package org.kabeja.dxf.entity;

import org.kabeja.dxf.DXFConstants;
import org.kabeja.dxf.helpers.Point;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * @author shutao
 * @since 2022/4/24 17:56
 */
public class DXFLeader extends DXFEntity {
    protected String styleName = "";
    protected double arrowHeadSize = 0.0D;
    protected double textGap;
    protected double scaleFactor;
    protected double textWidth;
    protected double textHeight;
    protected List<Point> coordinates = new ArrayList<>();
    protected int pathType = 0;
    protected int creationType = 0;
    protected int hooklineDirecton = 0;
    protected boolean hookline = false;
    protected Point horizontalDirection = new Point();
    protected Point lastOffsetText = new Point();
    protected Point lastOffsetInsertion = new Point();
    protected boolean arrowEnabled = false;
    protected String textID = "";

    public DXFLeader() {
        this.setLineType(this.getType());
    }

    public String getTextID() {
        return this.textID;
    }

    public void setTextID(String var1) {
        this.textID = var1;
    }

    @Override
    public Bounds getBounds() {
        Bounds var1 = new Bounds();
        var1.setValid(false);
        return var1;
    }

    @Override
    public String getType() {
        return DXFConstants.ENTITY_TYPE_LEADER;
    }

    public double getArrowHeadSize() {
        return this.arrowHeadSize;
    }

    public void setArrowHeadSize(double var1) {
        this.arrowHeadSize = var1;
    }

    public int getCreationType() {
        return this.creationType;
    }

    public void setCreationType(int var1) {
        this.creationType = var1;
    }

    public boolean isHookline() {
        return this.hookline;
    }

    public void setHookline(boolean var1) {
        this.hookline = var1;
    }

    public int getHooklineDirecton() {
        return this.hooklineDirecton;
    }

    public void setHooklineDirecton(int var1) {
        this.hooklineDirecton = var1;
    }

    public Point getHorizontalDirection() {
        return this.horizontalDirection;
    }

    public void setHorizontalDirection(Point var1) {
        this.horizontalDirection = var1;
    }

    public Point getLastOffsetInsertion() {
        return this.lastOffsetInsertion;
    }

    public void setLastOffsetInsertion(Point var1) {
        this.lastOffsetInsertion = var1;
    }

    public Point getLastOffsetText() {
        return this.lastOffsetText;
    }

    public void setLastOffsetText(Point var1) {
        this.lastOffsetText = var1;
    }

    public int getPathType() {
        return this.pathType;
    }

    public void setPathType(int var1) {
        this.pathType = var1;
    }

    public double getScaleFactor() {
        return this.scaleFactor;
    }

    public void setScaleFactor(double var1) {
        this.scaleFactor = var1;
    }

    public String getStyleNameID() {
        return this.styleName;
    }

    public void setStyleNameID(String var1) {
        this.styleName = var1;
    }

    public double getTextGap() {
        return this.textGap;
    }

    public void setTextGap(double var1) {
        this.textGap = var1;
    }

    public double getTextHeight() {
        return this.textHeight;
    }

    public void setTextHeight(double var1) {
        this.textHeight = var1;
    }

    public double getTextWidth() {
        return this.textWidth;
    }

    public void setTextWidth(double var1) {
        this.textWidth = var1;
    }

    public void addCoordinate(Point var1) {
        this.coordinates.add(var1);
    }

    public int getCoordinateCount() {
        return this.coordinates.size();
    }

    public Point getCoordinateAt(int var1) {
        return (Point)this.coordinates.get(var1);
    }

    public Iterator<Point> getCoordinateIterator() {
        return this.coordinates.iterator();
    }

    public boolean isArrowEnabled() {
        return this.arrowEnabled;
    }

    public void setArrowEnabled(boolean var1) {
        this.arrowEnabled = var1;
    }

    public boolean isSplinePath() {
        return this.pathType == 1;
    }

    @Override
    public double getLength() {
        return 0.0D;
    }
}
